﻿@model IEnumerable<FOModels.News.NewsModel>
@{
    ViewBag.Title = "Tin khuyến mãi";
    Layout = "~/Views/Shared/_SUBLayout1.cshtml";
    int pagesize = (int)ViewBag.PageSize;
    int currentpage = (int)ViewBag.CurrentPage;
}

<div class="thirdMenu">
    <div class="menuThird">
        <div class="breadCrumb" itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb">
            <div class="link1">
                <a href="http://vnexpress.net" class="aLink1">
                    <span itemprop="Trang nhất">Tin khuyến mãi</span>
                </a>
            </div>

        </div>

    </div>
</div>
<div id="topnews">
    <div id="top4" class="top4">
        @Html.Action("HotestNews", "News")
    </div>
    <div class="widget-2 widget-inner">
        @Html.Action("ProductList", "News")
    </div>
    <div class="clr"></div>
    <div class="posts" id="homepage_posts" data-posts-per-row="3" style="height: 467px;">
        @foreach (var n in Model)
        {
            var user = @FOSystem.Utility.ConfigHelper.seacrhUser(n.CreateUser);
            <div class="post-5983 post type-post status-publish format-standard hentry category-car category-travel tag-cambodia-holiday tag-china-travel tag-drive-in-jeju tag-holiday-tips tag-korea-travel tag-left-hand-drive tag-right-hand-drive tag-self-drive-holiday tag-self-drive tag-self-drive-holidays tag-seoul-holiday tag-travel-tips tag-vietnam-travel grid_4 grid_4_h">
                <div class="post_item post_itme_h">
                    <p class="p-productname">@n.ProductName</p>
                    <a href="@Url.Action("NewsDetail", "News", new { NewsTitle = FO.Models.Conver.ConvertToUnSign(n.NewsTitle.ToLower()), NewsID = n.NewsID })" class="overlay_1" style="margin: 0px 0px 15px; background-image: none;">
                        <img width="290" height="194" src="@Url.Content("~/Content/Upload/Images/" + n.NewsImg + "")" alt="road sign right" title="road-sign-look-right" style="margin: 0px; display: inline-block; height: 194px; overflow: hidden;">
                        <div class="zoomOverlay" style="opacity: 0; display: block; background-color: rgb(26, 26, 26);"></div>
                    </a>

                    <h2>
                        <a href="@Url.Action("NewsDetail", "News", new { NewsTitle = FO.Models.Conver.ConvertToUnSign(n.NewsTitle.ToLower()), NewsID = n.NewsID })">@n.NewsTitle</a>
                    </h2>
                    <p>@n.NewsSumary</p>

                    <div class="post_details">
                        <div class="author_date">
                            By <a href="http://www.directasia.com/blog/author/craig/">@user.DisplayName</a> at <a href="#">@n.CreateDate.Day</a> / <a href="#">@n.CreateDate.Month</a> / <a href="#">@n.CreateDate.Year</a>
                        </div>
                        <a class="comment_box" href="#">@n.ViewCount</a>
                    </div>
                </div>

                <div class="post_shadow"></div>
            </div>
        }

    </div>
    @if (pagesize > 1)
    {
        <div class="pagercontainer clearfix">

            @for (int i = 1; i <= pagesize; i++)
            {
                if (i == currentpage)
                {
                <div class="currentpage">@currentpage</div>
                }
                else
                {
                <a href="@Url.Action("Index", "News", new { page = i })">@i</a>
                }
            }
        </div>
    }
</div>
